﻿<%@ Page Language="C#" MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="true" CodeFile="KhachHang.aspx.cs" Inherits="Admin_DangNhap" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:MultiView ID="MultiView1" runat="server">
    <asp:View ID="View3" runat="server">
        <table class="style7">
            <tr>
                <td class="style8" valign="top">
                    Tên khách hàng:</td>
                <td align="left" style="width: 344px">
                    <asp:TextBox ID="TextBox16" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="style8" valign="top">
                    Giới tính:</td>
                <td align="left" style="width: 344px">
                    <asp:RadioButtonList ID="RadioButtonList1" runat="server" Width="153px">
                        <asp:ListItem>Nam</asp:ListItem>
                        <asp:ListItem>Nữ</asp:ListItem>
                    </asp:RadioButtonList>
                </td>
            </tr>
            <tr>
                <td class="style8">
                    &nbsp;</td>
                <td align="left" style="width: 344px">
                    <asp:Button ID="Button8" runat="server" CausesValidation="False" 
                        onclick="Button8_Click" Text="Tìm" Width="88px" />
                    <br />
                    <asp:Label ID="Label1" runat="server"></asp:Label>
                </td>
            </tr>
            <tr>
                <td class="style8" colspan="2">
                    <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
                        AutoGenerateColumns="False" onpageindexchanging="GridView1_PageIndexChanging1" 
                        onrowcancelingedit="GridView1_RowCancelingEdit1" 
                        onrowediting="GridView1_RowEditing1" 
                        onrowupdating="GridView1_RowUpdating1">
                        <Columns>
                            <asp:TemplateField>
                                <ItemTemplate>
                                    <asp:CheckBox ID="CheckBox1" runat="server" />
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="MaKH" HeaderText="Mã khách hàng" ReadOnly="True" />
                            <asp:BoundField DataField="HoTen" HeaderText="Họ tên" />
                            <asp:BoundField DataField="TenDN" HeaderText="Tên đăng nhập" />
                            <asp:BoundField DataField="MatKhau" HeaderText="Mật khẩu" />
                            <asp:TemplateField HeaderText="Giới tính">
                                <ItemTemplate>
                                    <asp:Label ID="Label1" runat="server" Text='<%# Bind("gioitinh") %>'></asp:Label>
                                </ItemTemplate>
                                <EditItemTemplate>
                                    <asp:RadioButtonList ID="RadioButtonList3" runat="server">
                                        <asp:ListItem Value="True">Nam</asp:ListItem>
                                        <asp:ListItem Value="false">Nữ</asp:ListItem>
                                    </asp:RadioButtonList>
                                </EditItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="NgaySinh" HeaderText="Ngày sinh" 
                                DataFormatString="{0:dd/MM/yyyy}" />
                            <asp:BoundField DataField="DiaChi" HeaderText="Địa chỉ" />
                            <asp:BoundField DataField="Email" HeaderText="Email" />
                            <asp:BoundField DataField="DienThoai" HeaderText="Điện thoại" />
                            <asp:CommandField EditText="Sửa" ShowEditButton="True" CancelText="Hủy" 
                                UpdateText="Lưu" />
                        </Columns>
                    </asp:GridView>
                    <asp:Button ID="Button9" runat="server" Text="Xóa" onclick="Button9_Click" 
                        CausesValidation="False" />
                    <asp:Button ID="Button6" runat="server" onclick="Button6_Click" Text="Thêm" 
                        style="height: 26px" CausesValidation="False" />
                </td>
            </tr>
        </table>
    </asp:View>
    <asp:View ID="View1" runat="server">
        <table class="style7" 
            style="border-style:
                        style="font-size: 25px;">
                    <caption>
                        Thêm khách hàng</td>
                        </tr>
                        <tr>
                            <td style="width: 135px; font-size: 15px;">
                                &nbsp;</td>
                            <td align="left">
                                <asp:ValidationSummary ID="ValidationSummary1" runat="server" />
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 135px; font-size: 15px;">
                                &nbsp;</td>
                            <td align="left">
                                <asp:Label ID="Label2" runat="server"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 135px; font-size: 15px;">
                                Họ tên:</td>
                            <td align="left">
                                <asp:TextBox ID="TextBox6" runat="server"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                                    ControlToValidate="TextBox6" ErrorMessage="Ho ten khong duoc rong">*</asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 135px; font-size: 15px;">
                                Tên đăng nhâp:</td>
                            <td align="left">
                                <asp:TextBox ID="TextBox19" runat="server" Width="162px"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator9" runat="server" 
                                    ControlToValidate="TextBox12" ErrorMessage="Ten dang nhap khong duoc rong">*</asp:RequiredFieldValidator>
                                <asp:CustomValidator ID="CustomValidator1" runat="server" 
                                    ControlToValidate="TextBox19" ErrorMessage="tên đăng nhập đã tồn tại" 
                                    onservervalidate="CustomValidator1_ServerValidate">*</asp:CustomValidator>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 135px; font-size: 15px;">
                                Mật khẩu:</td>
                            <td align="left">
                                <asp:TextBox ID="TextBox20" runat="server" Width="161px" TextMode="Password"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator10" runat="server" 
                                    ControlToValidate="TextBox12" ErrorMessage="Chua co mat khau">*</asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 135px; font-size: 15px;">
                                Mật khẩu xác nhận:</td>
                            <td align="left">
                                <asp:TextBox ID="TextBox21" runat="server" TextMode="Password"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator11" runat="server" 
                                    ControlToValidate="TextBox21" 
                                    ErrorMessage="mật khẩu xác nhận không được rỗng">*</asp:RequiredFieldValidator>
                                <asp:CompareValidator ID="CompareValidator1" runat="server" 
                                    ControlToCompare="TextBox20" ControlToValidate="TextBox21" 
                                    ErrorMessage="Mật Khẩu Xác Nhận Không Đúng">*</asp:CompareValidator>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 135px; font-size: 15px;">
                                Giới tính:</td>
                            <td align="left">
                                <asp:RadioButtonList ID="RadioButtonList2" runat="server">
                                    <asp:ListItem Value="True">Nam</asp:ListItem>
                                    <asp:ListItem Value="False">Nữ</asp:ListItem>
                                </asp:RadioButtonList>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 135px; font-size: 15px;">
                                Ngày sinh:</td>
                            <td align="left">
                                <asp:TextBox ID="TextBox9" runat="server"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator12" runat="server" 
                                    ControlToValidate="TextBox9" ErrorMessage="Ngày sinh không được rỗng">*</asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 135px; font-size: 15px;">
                                Địa chỉ:</td>
                            <td align="left">
                                <asp:TextBox ID="TextBox10" runat="server"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" 
                                    ControlToValidate="TextBox10" ErrorMessage="Chua co dia chi">*</asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 135px; font-size: 15px;">
                                Điện thoại:</td>
                            <td align="left">
                                <asp:TextBox ID="TextBox11" runat="server"></asp:TextBox>
                                <asp:RegularExpressionValidator ID="RegularExpressionValidator6" runat="server" 
                                    ControlToValidate="TextBox11" ErrorMessage="Số điện thoại không hợp lệ" 
                                    ValidationExpression="\d{1,15}">*</asp:RegularExpressionValidator>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 135px; font-size: 15px;">
                                Email:</td>
                            <td align="left">
                                <asp:TextBox ID="TextBox12" runat="server" Width="292px"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" 
                                    ControlToValidate="TextBox12" ErrorMessage="Chua co email">*</asp:RequiredFieldValidator>
                                <asp:RegularExpressionValidator ID="RegularExpressionValidator5" runat="server" 
                                    ControlToValidate="TextBox12" ErrorMessage="E mail khong dung cau truc" 
                                    ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*">*</asp:RegularExpressionValidator>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                &nbsp;</td>
                            <td align="left">
                                <asp:Button ID="Button7" runat="server" onclick="Button7_Click" Text="Lưu" />
                            </td>
                        </tr>
                    </caption>
        </table>
    </asp:View>
</asp:MultiView>
<br />
</asp:Content>

